package fr.vvins.core.catalog.entity;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import fr.vvins.core.dao.EntityImpl;

/**
 * RatingVin entity
 */
@Entity
@Table(schema="vvins",name="VV_VIGNERON_RATING")
public class VigneronRating extends EntityImpl implements Serializable {

	private static final long serialVersionUID = 867367775721300908L;
	@Id
	@GeneratedValue
	@Column(name="ID")
	private Integer id;
	
	@Basic
	@Column(name="TYPE")
	private String type;
	
	@Basic
	@Column(name="SCORE")
	private Float score;
	
	@ManyToOne
	@JoinColumn(name="VIGNERON_ID")
	private Vigneron vigneron;
	
	public VigneronRating() {
	}

	public VigneronRating(Integer id) {
		this.id = id;
	}

	public VigneronRating(Integer id, String type, Float score) {
		this.id = id;
		this.type = type;
		this.score = score;
	}

	@Override
	public Integer getId() {
		return this.id;
	}

	@Override
	public void setId(Integer id) {
		this.id = id;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Float getScore() {
		return this.score;
	}

	public void setScore(Float score) {
		this.score = score;
	}

	public Vigneron getVigneron() {
		return vigneron;
	}

	public void setVigneron(Vigneron vigeron) {
		this.vigneron = vigeron;
	}

}
